home *** CD-ROM | disk | FTP | other *** search
/ FishMarket 1.0 / FishMarket v1.0.iso / fishies / 526-550 / disk_545 / drawmap / src.lzh / drawmap-req.h < prev    next >
C/C++ Source or Header  |  1991-09-13  |  5KB  |  187 lines

  1. /* file drawmap-req.h */
  2.  
  3. #define NUM_CHAR 25                    /* # characters in text buffer */
  4.  
  5. #define TLEFT   24                     /* left edge of requester */
  6. #define TTOP    24                     /* top edge of requester  */
  7. #define TWIDTH  8*(NUM_CHAR+5)         /* width of requester     */
  8. #define THEIGHT 80                     /* height of requester    */
  9.  
  10. #define GAD_FIRST 1                    /* initial gadget id       */
  11. #define GAD_LEFT  16                   /* string gadget left edge */
  12. #define GAD_TOP   THEIGHT/2            /* string gadget top edge  */
  13.  
  14. struct IntuiText rtext = {             /* prompt in text requester */
  15.    BLACK, ORANGE, JAM1,
  16.    GAD_LEFT, (GAD_TOP-4)/2,
  17.    NULL,
  18.    (UBYTE *) "Enter desired text:",
  19.    NULL
  20. };
  21.  
  22. struct IntuiText dtext = {             /* prompt in doubleword requester */
  23.    BLACK, ORANGE, JAM1,
  24.    GAD_LEFT, (GAD_TOP-4)/2,
  25.    NULL,
  26.    (UBYTE *) "Enter desired altitude:",
  27.    NULL
  28. };
  29.  
  30. UBYTE user_text_input[NUM_CHAR+1];     /* buffer for user text */
  31. UBYTE default_text[] = "Text";         /* default text         */
  32. UBYTE user_double_input[NUM_CHAR+1];   /* buffer for user doubleword */
  33. UBYTE default_double[NUM_CHAR+1];      /* buffer for default value   */
  34.  
  35. struct StringInfo gadgetinput = {      /* gadget string text           */
  36.    &user_text_input[0],                /* buffer for user input        */
  37.    NULL,                               /* no undo buffer               */
  38.    0,                                  /* character position in buffer */
  39.    NUM_CHAR+1,                         /* max. characters in buffer    */
  40.    0,                                  /* buffer position of first     */
  41.                                        /*   displayed character        */
  42.    0, 0, 0, 0, 0, NULL, 0, NULL        /* Intuition local variables    */
  43. };
  44.  
  45. struct Gadget gad = {                  /* string gadget structure  */
  46.    NULL,                               /* pointer to next gadget   */
  47.    GAD_LEFT, GAD_TOP, 8*(NUM_CHAR+1),  /* left, top, width, height */
  48.          10,                           /*   of hit box             */
  49.    GADGHCOMP,                          /* flags                    */
  50.    RELVERIFY | ENDGADGET,              /* activation flags         */
  51.    REQGADGET | STRGADGET,              /* gadget type = string     */
  52.    NULL,                               /* border descriptor        */
  53.    NULL,                               /* alternate imagery        */
  54.    NULL,                               /* gadget text              */
  55.    0,                                  /* no mutual exclusion      */
  56.    (APTR) &gadgetinput,                /* special info             */
  57.    GAD_FIRST,                          /* gadget identifier        */
  58.    NULL                                /* pointer to data          */
  59. };
  60.  
  61. short bordertop2[] = {                 /* inside top border */
  62.    8, 8,
  63.    TWIDTH-9, 8
  64. };
  65.  
  66. short borderright2[] = {               /* inside right border */
  67.    TWIDTH-9, 8,
  68.    TWIDTH-9, THEIGHT-9
  69. };
  70.  
  71. short borderbottom2[] = {              /* inside bottom border */
  72.    TWIDTH-9, THEIGHT-9,
  73.    8, THEIGHT-9
  74. };
  75.  
  76. short borderleft2[] = {                /* inside left border */
  77.    8, THEIGHT-9,
  78.    8, 8
  79. };
  80.  
  81. short bordertop[] = {                  /* top border lines */
  82.    0, 0,
  83.    TWIDTH-1, 0,
  84.    TWIDTH-2, 1,
  85.    1, 1,
  86.    2, 2,
  87.    TWIDTH-3, 2,
  88. };
  89.  
  90. #define NUM_PAIRS_TOP sizeof(bordertop) / (2*sizeof(short))
  91.  
  92. short borderright[] = {                /* right border lines */
  93.    TWIDTH-3, 2,
  94.    TWIDTH-3, THEIGHT-3,
  95.    TWIDTH-2, THEIGHT-2,
  96.    TWIDTH-2, 1,
  97.    TWIDTH-1, 0,
  98.    TWIDTH-1, THEIGHT-1
  99. };
  100.  
  101. #define NUM_PAIRS_RIGHT sizeof(borderright) / (2*sizeof(short))
  102.  
  103. short borderbottom[] = {               /* bottom border lines */
  104.    TWIDTH-1, THEIGHT-1,
  105.    0, THEIGHT-1,
  106.    1, THEIGHT-2,
  107.    TWIDTH-2, THEIGHT-2,
  108.    TWIDTH-3, THEIGHT-3,
  109.    2, THEIGHT-3,
  110. };
  111.  
  112. #define NUM_PAIRS_BOTTOM sizeof(borderbottom) / (2*sizeof(short))
  113.  
  114. short borderleft[] = {                 /* left border lines */
  115.    2, THEIGHT-3,
  116.    2, 2,
  117.    1, 1,
  118.    1, THEIGHT-2,
  119.    0, THEIGHT-1,
  120.    0, 0
  121. };
  122.  
  123. #define NUM_PAIRS_LEFT sizeof(borderleft) / (2*sizeof(short))
  124.  
  125. struct Border border_left2 = {         /* inside left border */
  126.    0, 0,
  127.    BLACK, ORANGE, JAM1,
  128.    2,
  129.    (short *) &borderleft2[0],
  130.    NULL
  131. };
  132.  
  133. struct Border border_bottom2 = {       /* inside bottom border */
  134.    0, 0,
  135.    WHITE, ORANGE, JAM1,
  136.    2,
  137.    (short *) &borderbottom2[0],
  138.    &border_left2
  139. };
  140.  
  141. struct Border border_right2 = {        /* inside right border */
  142.    0, 0,
  143.    WHITE, ORANGE, JAM1,
  144.    2,
  145.    (short *) &borderright2[0],
  146.    &border_bottom2
  147. };
  148.  
  149. struct Border border_top2 = {          /* inside top border */
  150.    0, 0,   BLACK, ORANGE, JAM1,
  151.    2,
  152.    (short *) &bordertop2[0],
  153.    &border_right2
  154. };
  155.  
  156. struct Border border_left = {          /* left border */
  157.    0, 0,
  158.    WHITE, ORANGE, JAM1,
  159.    NUM_PAIRS_LEFT,
  160.    (short *) &borderleft[0],
  161.    &border_top2
  162. };
  163.  
  164. struct Border border_bottom = {        /* bottom border */
  165.    0, 0,
  166.    BLACK, ORANGE, JAM1,
  167.    NUM_PAIRS_BOTTOM,
  168.    (short *) &borderbottom[0],
  169.    &border_left
  170. };
  171.  
  172. struct Border border_right = {         /* right border */
  173.    0, 0,
  174.    BLACK, ORANGE, JAM1,
  175.    NUM_PAIRS_RIGHT,
  176.    (short *) &borderright[0],
  177.    &border_bottom
  178. };
  179.  
  180. struct Border border_top = {           /* top border */
  181.    0, 0,
  182.    WHITE, ORANGE, JAM1,
  183.    NUM_PAIRS_TOP,
  184.    (short *) &bordertop[0],
  185.    &border_right
  186. };
  187.